﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Light.Framework.Model;

namespace Light.Framework.Contract
{
    public interface IOrganizationComponent : IComponent<Organization>
    {

        /// <summary>
        /// 根据联系人的电话号码获取机构网点
        /// </summary>
        /// <param name="phone"></param>
        /// <returns></returns>
        Organization GetByPhone(string phone);

        /// <summary>
        /// 获取子机构
        /// </summary>
        /// <param name="org">父机构</param>
        /// <param name="includeSelf">结果列表中是否包含自己</param>
        /// <returns></returns>
        IList<Organization> GetSubOrganization(Organization org, bool includeSelf);
    }
}